package com.k2.gulimall.auth.vo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

@Data
public class UserRegisterVo {

    @Pattern(regexp = "^(?!_)(?!.*?_$)[a-zA-Z0-9_.\u4e00-\u9fa5]+",message = "用户名仅支持中文，字母，数字，'_'的六位组合")
    @Length(min = 2,max = 10,message = "用户名必须是4-10位字符")
    private String userName;
    @NotEmpty(message = "密码不能未空")
    @Length(min = 6,max = 18,message = "密码必须是6-18位字符")
    private String password;
    @Pattern(regexp = "^[1][3,4,5,7,8][0-9]{9}$",message = "手机号不合规")
    private String phone;
    @NotEmpty(message = "验证码必须填写")
    private String code;
    private String cityname;
    private String Ip;


}
